# Contributor: Dmitry Zakharchenko <dmitz@disroot.org>
# Maintainer: Dmitry Zakharchenko <dmitz@disroot.org>
pkgname=py3-pendulum
_pkgname=pendulum
pkgver=2.1.2
pkgrel=3
pkgdesc="Python datetimes made easy"
url="https://pendulum.eustace.io"
arch="noarch"
license="MIT"
depends="python3 py3-dateutil py3-pytzdata"
makedepends="py3-gpep517 py3-poetry-core py3-installer"
checkdepends="py3-babel py3-freezegun py3-pytest py3-tz"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/sdispater/$_pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl
}

sha512sums="
c367320ade0d10b7eb9c880286176161b925d7df052f7de85ddd169594bbe778776ea74df451f00186df98be3e32b7399c68ca4b40123e2c456206410e3a1ab2  py3-pendulum-2.1.2.tar.gz
"
